<?php

global $confirmType;
global $actionType;
global $organizationType;
	$year= date('Y');
	$month= date('m');
	$date= date('d');
	
//return;
?>
	<div class="block">

	<div class="invertedshiftdown">
<ul>
	<?php
	if($organization->type=='s'){
	?>
			<li><a href="?page=organization_inventory&id=<?php echo $organization->id; ?>">查看货存</a></li>
			<li><a href="?page=organization_sell&id=<?php echo $organization->id; ?>">出售</a></li>
			<li><a href="?page=organization_return&id=<?php echo $organization->id; ?>">退款</a></li>
			<li><a href="?page=organization_distribute&id=<?php echo $organization->id; ?>">分配</a></li>
			<li><a href="?page=organization_distribute_confirm&id=<?php echo $organization->id; ?>">处理待定分配</a></li>
			<li><a href="?page=organization_transaction&id=<?php echo $organization->id; ?>">查看物流记录</a></li>
			<li class="current"><a href="?page=organization_sell_record&id=<?php echo $organization->id; ?>">查看销售记录</a></li>
	<?php
	}elseif($organization->type=='w'){
	?>
	       	<li><a href="?page=organization_inventory&id=<?php echo $organization->id; ?>">查看库存</a></li>
			<li><a href="?page=organization_stack&id=<?php echo $organization->id; ?>">入库</a></li>
			<li><a href="?page=organization_distribute&id=<?php echo $organization->id; ?>">分配</a></li>
			<li><a href="?page=organization_distribute_confirm&id=<?php echo $organization->id; ?>">处理待定分配</a></li>
			<li><a href="?page=organization_transaction&id=<?php echo $organization->id; ?>">查看物流记录</a></li>
			
    <?php
	}
	?>
</ul>




<form id="myform">
<input type="text" class="textinput" /> <input class="submit" type="submit" value="搜索" />
</form>
</div>

<br style="clear: both;" />
<div id= 'content'>

	<div class="isa_info">
		<h4><?php echo $message ?></h4><?php echo $condition ?>
	</div>
		<h2><?php echo $organization->name ?>》销售记录显示</h2>
	<?php
	echo $table;
	?>
	<br><br>
	<table class="optionTable">
		<tr ><td class="left">
		<h4>按条件搜索</h4>
		 <form action="" method="post">

        	
            <div class="element">
             <label class="form">扫描条码</label>
             <input type="text" id="scan_code" name="scan_code" class="text" maxlength="14" size="14"><div class="important">若为空，搜查结果会显示全部条形码</div>
            </div>

             <div style="clear:both;">
             	            <div class="element">

             <label class="form">交易日期</label>
 </div>
  <li>
<label>
从
</label>
<span>
	
	
	
<select name="fromYear">
	<?php
	for($i = 2009; $i <= 2020; $i++){
		if($year==$i){
		 echo "<option value='$i' selected>$i</option>";
		}else{
		 echo "<option value='$i'>$i</option>";		
			
		}
	}
	?>
</select>
 <label for="Field103">年</label>
</span>
<span class="symbol">/</span>
<span>
<select name="fromMonth">
	<?php
	for($i = 1; $i <= 12; $i++){
		if($i<10){
	   		$i="0".$i;
		}
	 if($month==$i){
		 echo "<option value='$i' selected>$i</option>";
		}else{
		 echo "<option value='$i'>$i</option>";		
		}
	}
	?>
</select><label for="Field103-1">月</label>
</span> 
<span class="symbol">/</span>
<span>
<select name="fromDate">
	<?php
   for($i = 1; $i <= 31; $i++){
   	if($i<10){
	   		$i="0".$i;
		}
	   if($date==$i){
		 echo "<option value='$i' selected>$i</option>";
		}else{
		 echo "<option value='$i'>$i</option>";		
		}
	}
	?>
</select>
<label for="Field103-2">日</label>
</span>



</li>

  <li>
<label>
到
</label>
<span>
	

<select name="toYear">
	<?php
	for($i = 2009; $i <= 2020; $i++){
		if($year==$i){
		 echo "<option value='$i' selected>$i</option>";
		}else{
		 echo "<option value='$i'>$i</option>";		
			
		}
	}
	?>
</select>
 <label for="Field103">年</label>
</span>
<span class="symbol">/</span>
<span>
<select name="toMonth">
	<?php
	for($i = 1; $i <= 12; $i++){
		if($i<10){
	   		$i="0".$i;
		}
	 if($month==$i){
		 echo "<option value='$i' selected>$i</option>";
		}else{
		 echo "<option value='$i'>$i</option>";		
			
		}
	}
	?>
</select><label for="Field103-1">月</label>
</span> 
<span class="symbol">/</span>
<span>
<select name="toDate">
	<?php
	for($i = 1; $i <= 31; $i++){
		if($i<10){
	   		$i="0".$i;
		}
	   if($date==$i){
	   
		 echo "<option value='$i' selected>$i</option>";
			
		}else{
		
		 echo "<option value='$i'>$i</option>";		
		}
	}
	?>
</select>
<label for="Field103-2">日</label>
</span>



</li>
   </div>
                <div style="clear:both;">

    <div class="element">
             <label class="form">最小金额</label>
             <input type="text" id="scan_code" name="minimal" class="text" size="14"><div class="important">若为空，搜查结果会无最小金额限制</div>
            </div>
   <div style="clear:both;">

    <div class="element">
             <label class="form">最大金额</label>
             <input type="text" id="scan_code" name="maximal" class="text" size="14" ><div class="important">若为空，搜查结果会无最大金额限制</div>
            </div>
   <br>
   <div class="element">
<input type="submit" value="递交" />
        <div class="loading"></div>
    				</div>
    			</form>
    		</td>
    		<td class="mid">
    			<center >
					<img border="0" src="images/line2.png" alt="Pulpit rock" width="270" height="200">
					<br>
					<form action="" method="post">
						<input type='hidden' name='option' value='_s_report_daterange_org_by_date_number'>
						<input type='submit' value="销售状况(件数/时间)">
					</form>
    			</center>
    		</td>
    		<td class="right">
    			<center>
					<img border="0" src="images/line1.png" alt="Pulpit rock" width="270" height="200">
					<div>
					<form action="" method="post">
						<input type='hidden' name='option' value='_s_report_daterange_org_by_date_amount'>
						<input type='submit' value="销售状况(金额/时间)">
					</form></div>
    			</center>
    		</td>
    	</tr>
    </table>

<br>
<br>
<br>


   
<div class="clear"></div>
	</div>